package com.example.shoppingmall.service;

import com.example.shoppingmall.pojo.Property;
import com.example.shoppingmall.dao.PropertyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PropertyService {
    @Autowired
    private PropertyMapper propertyMapper;

    public List<Property>propertyList(){
        return propertyMapper.propertyList();
    }

    public List<Property>propertyListForNo(@Param("no")int no){
        return propertyMapper.propertyListForNo(no);
    }

    public int count(){
        return propertyMapper.count();
    }

    public Property xiangQing(@Param("id")int id){
        return propertyMapper.xiangQing(id);
    }

    public int add(Property property){
        return propertyMapper.add(property);
    }

    public int delete(@Param("id")int id){
        return propertyMapper.delete(id);
    }

    public int update(Property property){
        return propertyMapper.update(property);
    }

    public int chackName(@Param("name")String name){
        return propertyMapper.chackName(name);
    }
}
